#include <iostream>
using namespace std;

#include "hash.hpp"

void test_open_address(){
    nhydata::open_address::HashTable<int,string> ht;
    
    ht.insert(make_pair<int,string>(1,"你好"));

    ht.insert(make_pair<int,string>(2,"他好"));
    ht.insert(make_pair<int,string>(3,"我也好"));

    auto it = ht.find(1);
    cout << "first : " << it->kv_.first << endl;
    cout << "second: " << it->kv_.second << endl;
}

void test_zipper(){
    nhydata::zipper::HashTable<int,string,nhydata::HashFunc<int>> ht;
    ht.insert(make_pair<int,string>(1,"你好"));
    ht.insert(make_pair<int,string>(2,"他好"));
    ht.insert(make_pair<int,string>(3,"我也好"));

    auto it = ht.find(3);
    cout << "first : " << it->kv_.first << endl;
    cout << "second: " << it->kv_.second << endl;
}

int main(){
    test_zipper();
}